<div class="container">
  <div class="bg-putih">

    <div class="jdl-page">
      <?php echo $judul; ?>
      <div class="clearfix"></div>
    </div>

    <?php echo display_flash(); ?>

    <?php echo form_open("data_riwayat_pasien/r_obat_add/$pasien[KdPasien]", array('class' => 'form-horizontal', 'role' => 'form', 'id' => 'form')); ?>
      <div class="form-group">
        <label class="col-xs-2 control-label">Nama Pasien</label>
        <div class="col-xs-10">
          <input type="hidden" value="<?php echo $pasien['KdPasien'] ?>" name="kode"/>
          <input class="form-control input-sm" type="text" disabled="disabled" value="<?php echo $pasien['Nama']." ( ".$pasien['KdPasien']." )" ?>">
        </div>
      </div>

      <div class="form-group">
        <label class="col-xs-2 control-label">Obat</label>
        <div class="col-xs-10">
          <script type="text/javascript">
             $(document).ready(function() {
              $("#obat-select").select2();
            });
           </script>
           <select id="obat-select" class="js-example-basic-single js-states form-control" name="obat">            
            <?php  
            $obat_getter = $this->db->get('obat');
            $res_obat_getter = $obat_getter->result_array();
            foreach($res_obat_getter as $data_obat):
              ?>
            <option value="<?php echo $data_obat['KdObat'] ?>"><?php echo $data_obat['NmObat'] ?></option>
            <?php
            endforeach;
            ?>
          </select>
        </div>
      </div>
      <div class="form-group">
        <label class="col-xs-2 control-label">Dosis</label>
        <div class="col-xs-10">
        <input type="text" name="dosis" class="form-control input-sm"/>
        </div>
      </div>
      <div class="form-group">
        <label class="col-xs-2 control-label">Keterangan</label>
        <div class="col-xs-10">
        <textarea class="form-control" name="keterangan"></textarea>
        </div>
      </div>

      <input type="submit" name="btn_add_r_obat" value="Tambah Data" class="btn btn-sm btn-primary" />
    <?php echo form_close(); ?>
  </div>        

  <div class="clearfix"></div>
</div>
    </div> <!-- /container -->